<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link href="https://cdn.bootcss.com/font-awesome/4.6.1/css/font-awesome.css" rel="stylesheet">
</head>

<body>
    <div id="container123"></div>
    <div id="container"></div>

    <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.js"></script>
    <script src="/raty.js"></script>
    <script>
        //多个参数  克隆给第一个
        //单个参数  克隆给$
        // $.extend({
        //     sayHello() {
        //         console.log(123)
        //     }
        // })

        // $.fn.extend({
        //     sayHello() {
        //         console.log(123)
        //     }
        // })

        // $("#container").sayHello()

        $("#container").raty({
            color: "red",
            count: 10,
            score: 2,
            choose(val) {
                console.log(val)
            }
        })

        $("#container123").raty({
            choose(val) {
                console.log(val)
            }
        })
    </script>
</body>

</html>